<?php
class Cargo extends AppModel {

	var $name = 'Cargo';
	var $displayField = 'descricaoCargo';
	var $validate = array(
		'cbo_id' => array('notempty'),
		'descricaoCargo' => array(
				'ruleisUnique' => array(
					'rule' => 'isUnique',
					'message' => 'Cargo já cadastrado'),
				'rulenotempty' => array(
					'rule' => 'notempty')
				)
	);

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $belongsTo = array(
		'Cbo' => array(
			'className' => 'Cbo',
			'foreignKey' => 'cbo_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

	var $hasMany = array(
		'Funcionario' => array(
			'className' => 'Funcionario',
			'foreignKey' => 'cargo_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'Funcoe' => array(
			'className' => 'Funcoe',
			'foreignKey' => 'cargo_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'Ppp' => array(
			'className' => 'Ppp',
			'foreignKey' => 'cargo_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);

}
?>